package benchmarks.tpch.mongo;

import api.Configuration;
import benchmarks.tpch.TPCHQuery;
import benchmarks.tpch.TPCHWorker;
import benchmarks.tpch.mongo.queries.*;

public class TPCHWorkerMongo extends TPCHWorker {
    public TPCHWorkerMongo(Configuration config) {
        super(config);
    }

    public TPCHQuery makeQueryImpl(String queryName) {
        if (queryName.equals("Q1")) {
            return new Q1Mongo();
        }
        else if (queryName.equals("Q8")){
            return new Q8Mongo();
        }
        else if (queryName.equals("Q15")){
            return new Q15Mongo();
        }
        else if (queryName.equals("Q20")){
            return new Q20Mongo();
        }
        else if (queryName.equals("Q21")){
            return new Q21Mongo();
        }
        else if (queryName.equals("Q22")){
            return new Q22Mongo();
        } else {
            throw new RuntimeException("Unknown Query of " + queryName);
        }
    }
}
